<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">


<ui:composition template="/templates/fornecedor.xhtml">

	<ui:define name="menu">
		<ui:include src="/fornecedor/menu.xhtml" />
	</ui:define>

	<ui:define name="conteudo">
		<div id="texto">

			<h2>Cadastro de Cliente</h2>
		</div>

		<h:form id="form">
			<h:messages />
			<p:growl id="growl" showDetail="false" />

			<h:inputHidden value="#{clienteBeanPJ.clientePJ.idCliente}" />

			<p:accordionPanel>
				<p:tab title="Dados do cliente">
					<p:fieldset>

						<div style="padding-left: 30px; float: left; margin-top: 10px;">

							<h:panelGrid columns="2">
								<h:outputLabel value="Nome : * " for="nome"
									style="font-weight:bold" />
								<p:inputText id="nome" label="Nome"
									value="#{clienteBean.cliente.nome}" required="true"
									requiredMessage="Informe o seu nome" size="40"
									style="heght:30px;" />
								<span id="erro"> <h:message for="nome" /></span>
							</h:panelGrid>

							<h:panelGrid columns="2">
								<h:outputLabel value="CNPJ : * " for="cpfCnpj"
									style="font-weight:bold" />
								<p:inputText id="cpfCnpj" label="CNPJ"
									value="#{clienteBean.cliente.cpfCnpj}" required="true"
									requiredMessage="Informe o seu CNPJ" size="40"
									style="heght:30px;" />
								<span id="erro"> <h:message for="cpfCnpj" /></span>
							</h:panelGrid>


							<h:panelGrid columns="4">
							
								<h:outputLabel value="Endereço : * " for="endereco"
									style="font-weight:bold" /> 
								<p:inputText id="endereco" label="endereco"
									value="#{clienteBean.cliente.endereco}" required="true"
									requiredMessage="Informe o seu endereco" size="36"
									style="heght:30px;"/>
								<span id="erro"> <h:message for="endereco" /></span>
								
							</h:panelGrid>

							<h:panelGrid columns="4">
								<h:outputLabel value="Estado * " for="estado"
									style="font-weight:bold" />
								<select name="estado">
									<option value="estado">Selecione o Estado</option>
									<option value="ac">Acre</option>
									<option value="al">Alagoas</option>
									<option value="am">Amazonas</option>
									<option value="ap">Amapá</option>
									<option value="ba">Bahia</option>
									<option value="ce">Ceará</option>
									<option value="df">Distrito Federal</option>
									<option value="es">Espírito Santo</option>
									<option value="go">Goiás</option>
									<option value="ma">Maranhão</option>
									<option value="mt">Mato Grosso</option>
									<option value="ms">Mato Grosso do Sul</option>
									<option value="mg">Minas Gerais</option>
									<option value="pa">Pará</option>
									<option value="pb">Paraíba</option>
									<option value="pr">Paraná</option>
									<option value="pe">Pernambuco</option>
									<option value="pi">Piauí</option>
									<option value="rj">Rio de Janeiro</option>
									<option value="rn">Rio Grande do Norte</option>
									<option value="ro">Rondônia</option>
									<option value="rs">Rio Grande do Sul</option>
									<option value="rr">Roraima</option>
									<option value="sc">Santa Catarina</option>
									<option value="se">Sergipe</option>
									<option value="sp">São Paulo</option>
									<option value="to">Tocantins</option>
								</select>

								<span id="erro"> <h:message for="estado" /></span>
							</h:panelGrid>

							<h:panelGrid columns="4">
								<h:outputLabel value="Email: " for="email"
									style="font-weight:bold" />
								<p:inputText id="email" label="email"
									value="#{clienteBean.cliente.email}" required="true"
									requiredMessage="Informe e-mail" size="42" style="heght:30px;" />
								<span id="erro"> <h:message for="email" /></span>
							</h:panelGrid>

							<h:panelGrid columns="4">
								<h:outputLabel value="Sexo: * " for="sexo"
									style="font-weight:bold" />
								<p:selectOneRadio value="#{clienteBean.cliente.sexo}">
									<f:selectItem itemLabel="Masculino" itemValue="Masculino" />
									<f:selectItem itemLabel="Feminino" itemValue="Feminino" />
								</p:selectOneRadio>
							</h:panelGrid>

							<h:panelGrid columns="4">
								<h:outputLabel value="Carteira de habilitação: * " for="catHab"
									style="font-weight:bold" />
								<p:inputText id="catHab" label="catHab"
									value="#{clienteBean.cliente.catHab}" required="true"
									requiredMessage="Informe carteira de hobilitação" size="23"
									style="heght:30px;" />
								<span id="erro"> <h:message for="endereco" /></span>
							</h:panelGrid>

							<h:panelGrid columns="4">
								<h:outputLabel value="Estado Emissor : " for="estadoEmissor"
									style="font-weight:bold" />																
								<p:inputText id="estadoEmissor" label="estadoEmissor"
									value="#{clienteBean.cliente.estadoEmissor}" required="false"
									requiredMessage="Informe estado emissor" size="32"
									style="heght:30px;" />
								<span id="erro"> <h:message for="passapor" /></span>
									
							</h:panelGrid>


							<h:panelGrid columns="4">
								<h:outputLabel value="Passaporte:" for="passaporte"
									style="font-weight:bold" />
								<p:inputText id="passaporte" label="passaporte"
									value="#{clienteBean.cliente.passaporte}" required="false"
									requiredMessage="Informe passaporte" size="37"
									style="heght:30px;" />
								<span id="erro"> <h:message for="passapor" /></span>
							</h:panelGrid>



							<h:panelGrid columns="4">
								<h:outputLabel value="Telefone: * " for="telefone"
									style="font-weight:bold" />
								<p:inputText id="telefone" label="telefone"
									value="#{clienteBean.cliente.telefone}" required="true"
									requiredMessage="Informe telefone" size="38"
									style="heght:30px;" />
								<span id="erro"> <h:message for="telefones" /></span>
							</h:panelGrid>

						</div>

					</p:fieldset>
				</p:tab>

			</p:accordionPanel>
			<br></br>


			<h:panelGroup>
				<h:commandButton value="Salvar" action="#{clienteBean.salvar}"
					style="height: 30px;" />

			<input type="reset" class="botao" value="Apagar dados" />
			</h:panelGroup>
			
			
			
		</h:form>

	</ui:define>
</ui:composition>
</html>